package edu.gyc.hishiro.shiro;


import org.apache.commons.lang.RandomStringUtils;
import org.apache.shiro.crypto.hash.SimpleHash;

public class MakeMd5 {
    public static void main(String[] args) {
        String hashAlgorithmName="MD5";
        String oldPass = "123456";
        String salt = RandomStringUtils.randomAlphabetic(6);
        int hashIterations=911;
        String result = new SimpleHash(hashAlgorithmName, oldPass, salt, hashIterations).toBase64();
        System.out.println(result);
    }

    public static String  make(String pass,String salt) {
        String hashAlgorithmName="MD5";
        int hashIterations=911;
        String result = new SimpleHash(hashAlgorithmName, pass, salt, hashIterations).toBase64();
        return result;
    }
}
